<?php
/**
 * User: 自娱自乐自逍遥
 * Date: 14-10-15
 * Time: 下午3:14
 */

namespace Admin\Controller;


use Vendor\TianKu\Controller;

class ModuleController extends Controller{

    /**
     * @var \Admin\Logic\ModuleLogic
     */
    protected $logic;

    public function __construct(){
        parent::__construct();
        $this->logic = D('Module','Logic');
    }

    public function index(){
        if(IS_AJAX){
            $this->ajaxReturn($this->logic->loadModuleList());
        }else{
            $this->assign('module_list', $this->logic->loadModuleList());
            $this->display();
        }
    }
} 